package com.yc.web.DTO;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

@Data
@NoArgsConstructor
public class CartDTO {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long cartId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productId;
    private Integer quantity;

    //商品的信息，用于后面查询的时候显示商品的信息
    private String productName; // 商品名称
    private BigDecimal price; // 当前价格
    private String mainImage; // 主图URL

}